console.log(document.cookie)
// 取出sessionid
var sessionId = undefined;
var cookie = document.cookie;
cookie = cookie.split("=");
if(cookie && cookie.length==2){
    sessionId = cookie[1];
}
var checkLoginUrl = "http://192.168.4.2:8088/paper/admin/logincheck";
$.ajax({
    type:"get",
    url:checkLoginUrl,
    data:{sessionId:sessionId},
    success:function(res){
        console.log("check:"+res.code)
        if(res.code==200){
            console.log(res.obj);
            window.loginAdmin = res.obj;
        }else{
            alert("请先登陆再操作");
            location.href="login.html"
        }
    },  
    xhrFields: {  
        withCredentials: true  
    } ,
    crossDomain: true
    }
);